package screen_calibration;
/*************************************************
 * File:	UpdatableComponentImpl.java
 * Description:	interface implementation
 *
 * Author: Gene Vishnevsky  Oct. 15, 1997
*************************************************/

import java.awt.Panel;

/**
* This abstract class defines a superclass for objects that must be updated
* under certain conditions and is capable to distinguish itself from other
* instances.
* @see UpdatableComponentIfc
*/

public abstract class UpdatableComponentImpl extends Panel implements UpdatableComponentIfc {

	private static int idCounter = 0;
	private int id;

	/**
	* Constructor assigns a unique id.
	*/
	public UpdatableComponentImpl() {
		id = idCounter++;
	}

	/**
	* Returns the ID.
	*/
	public int getID() {
		return id;
	}

	/**
	* This method must be overridden by the object to update itself.
	*/
	abstract public void update();
}


